<template>
    <div class="hello">
      {{$store.state.count}}
  <button @click="fn">点击</button>
    </div>
  </template>
  
  <script>
  export default {
    methods: {
      fn () {
        //2.使用 this.$store.commit.要调用的仓库方法,来修改仓库
        this.$store.commit('addCount',50)
      }
    }
  }
  </script>

  <style>
  
  </style>
  